﻿<Dialogs:BaseMetroDialog xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                         xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
                         xmlns:Dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs"
                         x:Class="MahApps.Metro.Controls.Dialogs.ProgressDialog"
                         Cursor="Wait">
    <Dialogs:BaseMetroDialog.Content>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <TextBlock Margin="0 5 0 0"
                       FontSize="{DynamicResource DialogMessageFontSize}"
                       Text="{Binding Message, RelativeSource={RelativeSource AncestorType=Dialogs:ProgressDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                       TextWrapping="Wrap"
                       Grid.Row="0"
                       Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Dialogs:ProgressDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}" />

            <StackPanel Grid.Row="1"
                        Orientation="Horizontal"
                        HorizontalAlignment="Right"
                        Height="85">
                <Button x:Name="PART_NegativeButton"
                        Height="35"
                        MinWidth="80"
                        Style="{DynamicResource AccentedDialogSquareButton}"
                        Content="{Binding NegativeButtonText, RelativeSource={RelativeSource AncestorType=Dialogs:ProgressDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                        Margin="5 0 0 0"
                        Cursor="Arrow"
                        Visibility="Hidden" />
            </StackPanel>
        </Grid>
    </Dialogs:BaseMetroDialog.Content>
    <Dialogs:BaseMetroDialog.DialogBottom>
        <Controls:MetroProgressBar HorizontalAlignment="Stretch"
                                   VerticalAlignment="Bottom"
                                   Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=Controls:MetroWindow, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                                   Height="6"
                                   EllipseDiameter="5"
                                   Panel.ZIndex="5"
                                   IsIndeterminate="True"
                                   Minimum="0.0"
                                   Maximum="1.0"
                                   Foreground="{Binding ProgressBarForeground, RelativeSource={RelativeSource AncestorType=Dialogs:ProgressDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                                   x:Name="PART_ProgressBar" />
    </Dialogs:BaseMetroDialog.DialogBottom>
</Dialogs:BaseMetroDialog>